varying vec3 normal, lightDir;
varying vec4 color;
uniform sampler1D celMap;

void main(){
  float intensity;
  float factor;

  intensity = max(dot(lightDir,normal),0.0);
  factor=(texture1D(celMap, intensity)).x;
  gl_FragColor = vec4(color.x*factor, color.y*factor, color.z*factor, color.a);
}